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

How come this only anchors the player in studio but not in game?

Asked by 8 years ago
function die()
script.Parent.Parent.Parent.ShopFrame.Visible = false
script.Parent.Parent.Parent.Frame.TextLabel.Visible = true
local player = game.Players.LocalPlayer
player.Character.Torso.Anchored = true
end

script.Parent.MouseButton1Down:connect(die)

What it does is it makes the other guis not to be shown and is supposed to anchor the player when in shop.

0
Try changing your script into a localscript (if it isn't one already) groovydino 2 — 8y
0
It's might be because you need to 'repeat wait() until player.Character'? Sometimes roblox stuffs up with this stuff TheDeadlyPanther 2460 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

Change the player.Character.Torso.Anchored = false to player.Character.Torso.Anchored = true .

Hope this helps.

0
i did duckyo011 36 — 8y
Ad
Log in to vote
0
Answered by
FiredDusk 1466 Moderation Voter
8 years ago
function die()
script.Parent.Parent.Parent.ShopFrame.Visible = false
script.Parent.Parent.Parent.Frame.TextLabel.Visible = true
player = game.Players.Name
    for i,v in pairs(game.Players.Name) --Get players name in a loop
        player.Character.Torso.Anchored = false

script.Parent.MouseButton1Down:connect(die)
0
Wait does this anchor every player? duckyo011 36 — 8y
0
Should not FiredDusk 1466 — 8y

Answer this question