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

Why Is My Local Script Acting Like a Server Script?

Asked by 3 years ago
Edited 3 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

A local script I wrote is acting like a server script. I got someone to play the game and when they touched ChatPart1, the GUI's showed for me. Here's the script so someone could help.

local Player = game.Players.LocalPlayer
local ChatPart1 = game.Workspace.ChatPart1
local PlayerGui = Player:WaitForChild("PlayerGui")
local Chatting1 = ChatPart1.Chatting

local DialogueGui = PlayerGui:WaitForChild("DialogueGui")
local Dialogue = DialogueGui:WaitForChild("Dialogue")
local Name = DialogueGui:WaitForChild("Name")

Dialogue.Visible = false
Name.Visible = false

ChatPart1.Touched:Connect(function()
    if Chatting1.Value == false then
        ChatPart1.Color = Color3.fromRGB(255,0,0)
        Chatting1.Value = true
        Dialogue.Visible = true
        Name.Visible = true
        Dialogue.Text = "Wow, you got up here."
        Name.Text = "fundayelover"
        wait(3)
        Dialogue.Text = "Why did you do this obby though?"
        wait(5)
        Dialogue.Text = "It was meaningless to get up here, there is no badge, nothing."
        wait(8)
        Dialogue.Text = "Well, I guess you aren't bad at obbies."
        wait(5)
        Dialogue.Visible = false
        Name.Visible = false
        Chatting1.Value = false
        ChatPart1.Color = Color3.fromRGB(0,255,0)
    end
end)
0
How exactly is it 'acting like a server script'? appxritixn 2235 — 3y
0
I got someone to play the game and when they touched ChatPart1, the TextLabels appeared for me. fundayelover 2 — 3y
0
That is likely because you are not checking *who* or *what* touched the part. It isn't acting like a server script; the Touched event fires whenever a BasePart touches another BasePart. appxritixn 2235 — 3y
0
oh ok fundayelover 2 — 3y

Answer this question