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

Why does the script not functioning in multiplayer?

Asked by 2 years ago
Edited 2 years ago

Basically I made an magic eight ball that makes a random output on clicking it, it works when theres 1 player in the server but not more than 2 does any one know the issue? thanks a lot :)

local f1 = "Always ask yourself, would a noob do this?"
local f2 = "Yes"
local f3 = "No"
local f4 = "Looks like it!"
local f5 = "Maybe"
local f6 = "Signs point to yes"
local f7 = "As I see it, yes"
local f8 = "It is certain"
local f9 = "It is decidedly so"
local f10 = "Reply hazy, try again"
local f11 = "Better not tell you..."
local f12 = "Very doubtful"
local f13 = "Don't count on it"
local f14 = "Sources say no..."
local f15 = "The future is uncertain right now"
local f16 = "I have no idea"
local f17 = "j00R PhU7UR3 15 L337"
local f18 = "I'm pretty tired"
local f19 = "Blame John"
local f20 = "ZOMG HAX!"
local f21 =  "it's OVAR 9000!!!111"
local f22 = "well done, ".. game.Players.LocalPlayer.Name.. "..."
local sayings = {f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22}


local deBounce = false 

workspace.Modeleight.Head.ball.Parent = game.Players.LocalPlayer.PlayerGui 

workspace.Modeleight.Head.ClickDetector.MouseClick:Connect(function(playerWhoClicked)
    if deBounce == false then
    deBounce = true 
    playerWhoClicked.PlayerGui:WaitForChild("ball").Enabled = true
    playerWhoClicked.PlayerGui:WaitForChild("ball").triangle.TextLabel.Text = sayings[math.random(1,#sayings)]

    wait(4)
    deBounce = false
    playerWhoClicked.PlayerGui:WaitForChild("ball").Enabled = false

 end
end)



0
does it give any errors once a second player joins? make sure this script is a local script and it's parented to Starter Character or Player Scripts aviel101 165 — 2y
0
thanks it was fixed now because I had to put it inside starter character scripts Yodadthin 2 — 2y

Answer this question