This is my server script:
local players =game:GetService("Players")
local tpp1 = script.Parent
local tpp2 = game.Workspace.teleportPart2
local debounce = false
local location = tpp2.CFrame
local rs = game.ReplicatedStorage
local tweenEvent = rs.TweenGui
function steppedOnTpp1(hit)
local hitParent = hit.Parent
local humanoid = hitParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
if debounce == false then
debounce = true
tweenEvent:FireClient(hitParent)
humanoid.Torso.CFrame = location + Vector3.new(0, 4, 0)
wait(3)
debounce = false
end
end
end
tpp1.Touched:Connect(steppedOnTpp1)
And then, I tested it on the local script in the frame here:
local frame = script.Parent
local rs = game.ReplicatedStorage
rs.TweenGui.OnClientEvent:Connect(function()
print("Received Event.")
end)
How can I solve this error?

1 comment
Thank you so much.