I'm new to remote events and these other things so, i forgot how to use them. I made a part that functions when touched and fires the event db = false script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if db == false then db = true game.ReplicatedStorage.Events.getgift:FireServer() wait(20) db = false elseif db == true then game.StarterGui:SetCore("SendNotification", { Title = "Too fast"; Text = "Please wait to get gifts again."; Icon = ""; Duration = 3; }) end end end)
then i made a script that connects a function on server event and gives stats
local player = game.Players.LocalPlayer game.ReplicatedStorage.Events.getgift.OnServerEvent:Connect(function() player.Stats.Gifts.Value = 109209090990090909 wait (20) end)
but it didnt work so yeah help? i want that only to work on a person that fires that event

1 comment
it may not be pasted perfectly