#remote event scripts not working pls help

1 messages · Page 1 of 1 (latest)

celest oracle
#

local RS = game:GetService("ReplicatedStorage")
local TP = RS:WaitForChild("TP")

TP.OnServerEvent:Connect(function(player)
print("Server received teleport request from:", player.Name)

local character = player.Character
if character then
    local hrp = character:FindFirstChild("HumanoidRootPart")
    if hrp then
        hrp.CFrame = CFrame.new(Vector3.new(60.4, 0.5, 38))
        print("Teleported", player.Name)
    else
        warn("No HumanoidRootPart for", player.Name)
    end
else
    warn("No character for", player.Name)
end

end)
-- this is local script

-- this is server script
local RS = game:GetService("ReplicatedStorage")
local TP = RS:WaitForChild("TP")

TP.OnServerEvent:Connect(function(player)
print("Server received teleport request from:", player.Name)

local character = player.Character
if character then
    local hrp = character:FindFirstChild("HumanoidRootPart")
    if hrp then
        hrp.CFrame = CFrame.new(Vector3.new(60.4, 0.5, 38))
        
    end
end

end)

server script is in SSS and local script is in a frame inside a screengui inside startergui

unkempt oasis
celest oracle
#

no sorry im a dumbass

#

this is local script

#

local RS = game:GetService("ReplicatedStorage")
local TP = RS:WaitForChild("TP")

local frame = script.Parent

frame:GetPropertyChangedSignal("BackgroundTransparency"):Connect(function()
if frame.BackgroundTransparency == 0 then
TP:FireServer()
end
end)

#

😭

unkempt oasis
#

Ah

celest oracle
#

i pasted server script 2 times idk why

#

afk 1 sec sry

dark cosmos
#

@celest oracle

celest oracle
#

yes

#

its solved btw

dark cosmos
#

Is your frame backgroudn transparency 0 ? Before starting the game?

dark cosmos
celest oracle
#

if u need to know uhh the issue was the ==

#

i needed to do <= for it to work

#

there was no errors lol