Remote Events in Roblox Studio |
Vložit
- čas přidán 2. 06. 2024
- Hi Leute heute habe ich wieder ein Video für euch hier sind die Scripts:
LocalScript:
local Event = game.ReplicatedStorage:WaitForChild("ClickEvent")
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Up:Connect(function()
if Mouse.Target then
Event:FireServer(Mouse.Target)
end
end)
Script im ServerScriptService:
local Event = game.ReplicatedStorage:WaitForChild("ClickEvent")
Event.OnServerEvent:Connect(function(player)
player.leaderstats.Cash.Value += 10
end)
Leaderstats Script:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local Cash = Instance.new("IntValue",leaderstats)
Cash.Name = "Cash"
Cash.Value = 0
end)
-Bis nächste Woche 😇-- - Hry