#How can I get a ServerScript to not be shared with multiple players?
1 messages · Page 1 of 1 (latest)
Player1 were able to spawn the ability until Player2 used it and now Player1 can't even do much
I need help on solving this issue matter
https://pastebin.com/C3eAtata
here is the script that function the ability
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
??
So we remaking slap battles
🔥🔥🔥🔥🔥🔥
But u need a local script to have the player do something by their self
And then send that to the server
I’m actually not quite sure how this is working
more like Killstreak Ultimate
it already has that, which is the Cooldown GUI, it triggers a Remote
I’m confused u must be sending something to the server that sends something back to the client to add a cooldown
the cooldown is only in localscript, serverscript has nothing to do with the cooldown
the server's job is to only spawn the ability and throw them, and that's it
do you need to see what a LocalScript is like?
Yea
local AbilityUI = PlayerGUI:WaitForChild("EButton")
Tool.Equipped:Connect(function()
OnEquip = true
end)
Tool.Unequipped:Connect(function()
OnEquip = false
end)
AbilityUI.Frame.Button.Activated:Connect(function(player)
if AbilityDB == false then
if OnEquip == true then
AbilityDB = true
CooldownUiModule.New(plr, AbilityName, Cooldown)
game.ReplicatedStorage:WaitForChild("AbilityActivation"):FireServer()
task.delay(Cooldown.Value, function()
AbilityDB = false
end)
end
end
end)
UserInput.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
if UserInput:GetFocusedTextBox() == nil then
if OnEquip == true then
if AbilityDB == false then
AbilityDB = true
CooldownUiModule.New(plr, AbilityName, Cooldown)
game.ReplicatedStorage:WaitForChild("AbilityActivation"):FireServer()
task.delay(Cooldown, function()
AbilityDB = false
end)
end
end
end
end
end)
end```
the cooldown contains a IntValue
Can u maybe send it in a screen shot cuz I’m on phone and it’s really hard for me to read
Cuz it’s all sideways and I colored
actually never mind, I think I just figured it out
all I had to do was add "player = player"
yeah sorry
** You are now Level 5! **
