Dev_Las
(Dev_Las)
December 22, 2023, 4:48pm
#1
Hello Developers, I recently discovered that instead of completely disabling the reset button, you can now fire a BindableEvent. However I tried this:
Client Sided Script:
local ResetDetected = game.ReplicatedStorage.ResetDetected
game:GetService("StarterGui"):SetCore("ResetButtonCallback", ResetDetected)
Server Sided Script:
local ResetDetected = game.ReplicatedStorage.ResetDetected
ResetDetected.Event:Connect(function(player)
player.Character.HumanoidRootPart.CFrame = workspace.SpawnLocation
end)
Why does it not teleport the player on Reset?
1 Like
KLL3o
(Kilo)
December 22, 2023, 4:52pm
#2
I’m not really keen on how bindable events work, so I might just be spreading misinformation, but I’m almost sure you’d use remote events here, since you’re moving from client to server.
2 Likes
Dev_Las
(Dev_Las)
December 22, 2023, 4:53pm
#3
1 Like
Well , maybe you would need to use game.Workspace.SpawnLocation.CFrame but does the player get still reset like normal? Maybe this interferes with something I’m not sure.
Dev_Las
(Dev_Las)
December 22, 2023, 4:55pm
#5
That isn’t the problem. I tested with prints, it simply doesn’t do anything on reset click.
Are you testing it in studio or outside of studio ? ( I thought before an error msg would pop up in studio)
system
(system)
Closed
January 5, 2024, 5:31pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.