Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why it works in solo but not online or 2 players with server ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago

I just want this to make it unrotatable like make players maxzoom distance 0? how i do that? Also it doesn't work as it title says only works trough triangle in studio this is not a local script or anything so

Camera = script.Parent.Parent.Parent.Model.Head

local ting = 0

function onTouched(hit)
    if ting == 0 then
    ting = 1
    local check = hit.Parent:FindFirstChild("Humanoid")
    local character = game.Players.LocalPlayer.Character

    if check ~= nil then
        check.WalkSpeed = 0
        character:WaitForChild("Humanoid"):SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
        player = game.Players:findFirstChild(check.Parent.Name)
        game.Workspace.Camera.CameraType = 5
        game.Workspace.Camera.CameraSubject = Camera
        exitgui = script.Parent.exitgui:clone()
        exitgui.Parent = player.PlayerGui
        wait(5)
        ting = 0
    end
    end
end

script.Parent.Touched:connect(onTouched)

Answer this question