It is putting it out in the output in studio, but not in the developer console in roblox. (I published and updated servers)
Check to see if your API Services are all enabled? And make sure that the toolâs name (Iâm guessing itâs a tool) is exact within the Playerâs backpack
I just re-started studio to check if my studio bugs.
And the publish did not worked properly before probaly, as now it works fine.
Thanks for all the replies! I appreciate it.
Definitly a weird one, not sure why itâs erroring but we can work around this.
local plr = game:GetService("Players").LocalPlayer
local Room101tp = workspace:WaitForChild("Roomteleportblocks").Room101tp
local function SetCharCFrame()
local plrCharacter = workspace:FindFirstChild(plr.Name)
if not plr:FindFirstChild("Room 101") or not plrCharacter then return end
plrCharacter.HumanoidRootPart.CFrame = Room101tp.CFrame
end
script.Parent.ClickDetector.MouseClick:Connect(SetCharCFrame)
do something like
this is bad variable naming, just an example
local p = game.Players.LocalPlayer
local c = p.Character or p.CharacterAdded:Wait()
The script that is being used seems to be running on the server not the client so localPlayer will be nil / error
May want to make it clear a solution has been found by marking one of the replies as a solution
The event wonât even run then.
Click detector events will run on the server and pass the player that clicked as an argument to the connected function. Heres the link to the mouseclick event ClickDetector | Documentation - Roblox Creator Hub
The issue was already fixed. My studio bugged and it didnât published the first script.
I had to re start studio for it to work.
Thanks for all the replies though! <3
My bad, only briefly read it, thought it was a UI event click.