Ive been going back to the basics of scripting to help improve my self, but now, i cant seem to get a function thats connected with a event to work, everything else works but the Function Event? Am i doing something wrong or?
local part = game.Workspace.Dank
print(script.Name .. " Has been Activated" )
game.Players.PlayerAdded:Connect(function(plr)
wait(1)
print(plr.Name .. " Has joined")
plr.CharacterAdded:Connect(function(char)
while true do
wait()
part.CFrame = CFrame.new(char.HumanoidRootPart.Position)
wait(1)
print("Updating Location")
end
end)
end)
local function cool()
print(game.Players.LocalPlayer.Name .. " Has joined The Game")
end
while true do
wait(2)
cool()
end

2 comments
Is it a server script or local script? "game.Players.LocalPlayer" can't be used in a server script.
Its a local